let obdEngData:any[]=[];

    obdEngData[0] = "1";
    obdEngData[1] = "2";
    obdEngData[2] = "3";
    obdEngData[3] = "4";
    obdEngData[4] = "5";

let obdAbsData:any[]=[];
    obdAbsData[0] = "6";
    obdAbsData[1] = "7";
    obdAbsData[2] = "8";
    obdAbsData[3] = "9";
    obdAbsData[4] = "10";

let obdData=obdEngData.concat(obdAbsData);
let stopGet,num1=1,num8=1;
function startObd():void{

    var eng = new EngineData();
    var abs = new AbsData();
    eng.dataAdd();
    eng.dataDiv();
    abs.dataAdd();
    abs.absDataMulti();
    stopGet=setTimeout("startObd()",1000);
}
function stopObd(){
        clearTimeout(stopGet);
}
interface obdInterface{
        dataAdd();
}
class CommonData{
    num2:number=2;
    num3:number=3;
    dataSubtraction(num1){
        // document.getElementById("count").value=this.num2+this.num3;
        // console.log(num1);
        if(num1){
            num1=this.num2+this.num3;
            return num1;
        }
    }
}
class EngineData extends CommonData implements obdInterface{
    num4:number=4;
    num5:number=5;
    num1=10;
     dataAdd(){
            //console.log(this.num4+this.num5);
               }
      dataDiv(){
          let num10=super.dataSubtraction(num1);
          let num11=0;
          if(num10){
              for(let i=0;i<obdData.length;i++){
                num11=num11+parseInt(obdData[i]);
                  document.getElementById("count").value=num11;
              }
            
              console.log(num11);
              return num11;
          }
          //console.log(3);
      }
}
class AbsData extends CommonData implements obdInterface{
    num6:number=6;
    num7:number=7;
    //num1=20;
    dataAdd(){
        //console.log(this.num6+this.num7);
    }
      absDataMulti(){
       let num9= super.dataSubtraction(num1);
       // console.log(super.dataSubtraction(num1));
      //  console.log(num9);
      }
}




